const content = {
  async contents (parent, { partId, first, skip, after }, ctx, info) {
    // 获取 part.contents
    return ctx.db.query.contents({
      first,
      skip,
      after,
      orderBy: 'createdAt_ASC',
      where: {
        parts_some: {
          id: partId
        }
      }
    }, info)
  }
}

module.exports = { content }
